//替换多少个字符得回文字符串

function tohuiwen(len, str) {
    let chars = str.split("");
    let count = 0;//计数

    for (let i = 0; i < len/2; i++) {
        if (chars[i] != chars[len - i - 1]) {
            count++;
        }
    }

    return count;
}

console.log(tohuiwen(5,"lswsl"));
